﻿using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Core.Service;

/// <summary>
/// 账号绑定基础输入参数
/// </summary>
public class UserBindBaseInput
    {
        /// <summary>
        /// 钉钉UserId
        /// </summary>
        public virtual string DingUserId { get; set; }
        
        /// <summary>
        /// 用户表UserId
        /// </summary>
        public virtual long UserId { get; set; }
        
        /// <summary>
        /// 创建者姓名
        /// </summary>
        public virtual string? CreateUserName { get; set; }
        
        /// <summary>
        /// 修改者姓名
        /// </summary>
        public virtual string? UpdateUserName { get; set; }
        
    }

    /// <summary>
    /// 账号绑定分页查询输入参数
    /// </summary>
    public class UserBindInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string? SearchKey { get; set; }

        /// <summary>
        /// 钉钉UserId
        /// </summary>
        public string? DingUserId { get; set; }
        
        /// <summary>
        /// 用户表UserId
        /// </summary>
        public long? UserId { get; set; }
        
    }

    /// <summary>
    /// 账号绑定增加输入参数
    /// </summary>
    public class AddUserBindInput : UserBindBaseInput
    {
        /// <summary>
        /// 钉钉UserId
        /// </summary>
        [Required(ErrorMessage = "钉钉UserId不能为空")]
        public override string DingUserId { get; set; }
        
        /// <summary>
        /// 用户表UserId
        /// </summary>
        [Required(ErrorMessage = "用户表UserId不能为空")]
        public override long UserId { get; set; }
        
    }

    /// <summary>
    /// 账号绑定删除输入参数
    /// </summary>
    public class DeleteUserBindInput : BaseIdInput
    {
    }

    /// <summary>
    /// 账号绑定更新输入参数
    /// </summary>
    public class UpdateUserBindInput : UserBindBaseInput
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required(ErrorMessage = "主键Id不能为空")]
        public long Id { get; set; }
        
    }

    /// <summary>
    /// 账号绑定主键查询输入参数
    /// </summary>
    public class QueryByIdUserBindInput : DeleteUserBindInput
    {

    }

    public class LoginDingDingInput : BaseIdInput
    {
    }